package tool;

import java.util.concurrent.atomic.AtomicLong;

/**
 * @author lijiahao
 * @since 2022/1/27
 */
public class GlobalUniqueGenerator {

    private static final AtomicLong CLIENT_ATOMIC_ID = new AtomicLong(1);
    private static final AtomicLong TANK_ATOMIC_ID = new AtomicLong(100);

    public static Long getGlobalId() {
        return CLIENT_ATOMIC_ID.getAndIncrement();
    }

    public static Long getTankId() {
        return TANK_ATOMIC_ID.getAndIncrement();
    }
}
